package com.paas.form.core.element.control.impl.searchItem;

import com.paas.form.core.element.control.FormItem;
import com.paas.form.core.element.field.FieLdsModel;
import com.paas.form.core.element.jsContent.ScriptContent;
import lombok.Data;


@Data
public class ElDatePicker implements FormItem {
    private FieLdsModel field;

    private String htmlType;

    public static final String EL_DATE_PICKER ="<el-date-picker v-model=\"${formObject}.${field.vModel}\" type=\"${field.type}\" clearable\n" +
            "style=\"width: 100%;\"    value-format=\"${field.valueformat}\" format=\"${field.format}\" " +
            "                 class=\"item\">\n" +
            "              </el-date-picker>";
    public static final String EL_DATE_PICKER_OLD ="<el-date-picker v-model=\"${formObject}.${field.vModel}\" type=\"${field.type}range\" clearable\n" +
            "                value-format=\"${field.valueformat}\" format=\"${field.format}\" start-placeholder=\"开始日期\"\n" +
            "                end-placeholder=\"结束日期\" class=\"item\">\n" +
            "              </el-date-picker>";


    public ElDatePicker(FieLdsModel field,String htmlType){
        this.field = field;
        this.htmlType = htmlType;

    }


    @Override
    public String makeVue() {
        return EL_DATE_PICKER;
    }

    @Override
    public ScriptContent makeJs() {
        return null;
    }
}
